import {searchSpan} from "@/api/span";

export const optionParent = {
  calcHeight: 95,
  tip: false,
  searchShow: true,
  searchMenuSpan: searchSpan(1),
  border: true,
  index: true,
  viewBtn: false,
  menuWidth: 150,
  dialogWidth: 880,
  dialogClickModal: false,
  addBtn: false,
  delBtn:false,
  editBtn:false,
  // menu:false,
  column: [
    {
      label: '工艺编码',
      prop: 'technologyNo',
      addDisplay: false,
      editDisplay: false,
      viewDisplay:false,
      rules:[{
        required:true,
        message:"请输入工艺编码",
        trigger: 'blur',
      }]
    },
    {
      label: '工艺名称',
      prop: 'technologyName',
      search:true,
      addDisplay: false,
      editDisplay: false,
      viewDisplay:false,
      rules:[{
        required:true,
        message:"请输入工艺名称",
        trigger: 'blur',
      }]

    },
    {
      label: '工艺描述',
      prop: 'technologyDescribe',
      addDisplay: false,
      editDisplay: false,
      viewDisplay:false,
      rules:[{
        required:true,
        message:"请输入工艺描述",
        trigger: 'blur',
      }]
    },
    {
      label: '有效',
      prop: 'isValid',
      type: "select",
      addDisplay: false,
      editDisplay: false,
      viewDisplay:false,
      value:1,
      dicData: [
        {
          label: "是",
          value: 1
        },
        {
          label: "否",
          value: 2
        }
      ],
    },
    {
      label:'创建人员',
      prop:'createUserstr',
      addDisplay:false,
      editDisplay:false,
      viewDisplay:false,
    },
    {
      label:'创建时间',
      prop:'createTimestr',
      addDisplay:false,
      editDisplay:false,
      viewDisplay:false,
    },
    {
      label:'修改人员',
      prop:'updateUserstr',
      addDisplay:false,
      editDisplay:false,
      viewDisplay:false,
    },
    {
      label:'修改时间',
      prop:'updateTimestr',
      addDisplay:false,
      editDisplay:false,
      viewDisplay:false,
    },
  ],
  group:[{
    label:"工艺信息",
    column:[ {
      label: '工艺编码',
      prop: 'technologyNo',
      editDisabled:true,
      maxlength:20,
      showWordLimit:true,
      rules:[{
        required:true,
        message:"请输入工艺编码",
        trigger: 'blur',
      }]
    },
      {
        label: '工艺名称',
        prop: 'technologyName',
        maxlength:20,
        showWordLimit:true,
        rules:[{
          required:true,
          message:"请输入工艺名称",
          trigger: 'blur',
        }]

      },
      {
        label: '工艺描述',
        prop: 'technologyDescribe',
        type: 'textarea',
        maxlength:60,
        showWordLimit:true,
        span: 24,
        rules:[{
          required:true,
          message:"请输入工艺描述",
          trigger: 'blur',
        }]
      },
      {
        label: '有效',
        prop: 'isValid',
        type: "select",
        value:1,
        dicData: [
          {
            label: "是",
            value: 1
          },
          {
            label: "否",
            value: 2
          }
        ],
      },
      {
        label:'创建人员',
        prop:'createUserstr',
        addDisplay:false,
        editDisplay:false
      },
      {
        label:'创建时间',
        prop:'createTimestr',
        addDisplay:false,
        editDisplay:false
      },
      {
        label:'修改人员',
        prop:'updateUserstr',
        addDisplay:false,
        editDisplay:false
      },
      {
        label:'修改时间',
        prop:'updateTimestr',
        addDisplay:false,
        editDisplay:false
      },
     {
        title: '',
        component: 'el-divider',
        span: 24,
        labelWidth: '0px',
        params: {
          contentPosition: 'left'
        },
      },
    ]
  }],
};

export const optionChild = {
  calcHeight: 95,
  tip: false,
  tree: true,
  border: true,
  index: true,
  viewBtn: true,
  menuWidth: 220,
  dialogWidth: 880,
  dialogClickModal: false,
  menu:false,
  addBtn:false,
  column: [
    {
      label:'节点编码',
      prop:'nodeNo'
    },
    {
      label:'节点名称',
      prop:'nodeName'
    },
    {
      label:'节点描述',
      prop:'nodeDescribe'
    },
    {
      label:'最终节点',
      prop:'nodeFinal',
      type: "select",
      value:1,
      dicData: [
        {
          label: "是",
          value: 1
        },
        {
          label: "否",
          value: 2
        }
      ],
    },
    {
      label:'有效',
      prop:'isValid',
      type: "select",
      value:1,
      dicData: [
        {
          label: "是",
          value: 1
        },
        {
          label: "否",
          value: 2
        }
      ],
    },
    {
      label:'创建人员',
      prop:'createUserstr',
      addDisplay:false,
      editDisplay:false
    },
    {
      label:'创建时间',
      prop:'createTimestr',
      addDisplay:false,
      editDisplay:false
    },
    {
      label:'修改人员',
      prop:'updateUserstr',
      addDisplay:false,
      editDisplay:false
    },
    {
      label:'修改时间',
      prop:'updateTimestr',
      addDisplay:false,
      editDisplay:false
    },
  ]
};


export const optionChild2 = {
  calcHeight: 95,
  tip: false,
  tree: true,
  border: true,
  index: true,
  viewBtn: true,
  menuWidth: 220,
  dialogWidth: 880,
  dialogClickModal: false,
  menu: false,
  addBtn: false,
  column: [
    {
      label: '生产线编码',
      prop: 'lineNo',
    },
    {
      label: '生产线名称',
      prop: 'lineName',
    },
    {
      label: '生产线描述',
      prop: 'lineDescribe',
    },
    {
      label: '共线生产数量',
      prop: 'lineCount',
    },
    {
      label: '线边库区',
      prop: 'edgeStockName',
    },
    {
      label: '创建人员',
      prop: 'createUserstr',
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
    },
    {
      label: '创建时间',
      prop: 'createTimestr',
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
    },
    {
      label: '修改人员',
      prop: 'updateUserstr',
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
    },
    {
      label: '修改时间',
      prop: 'updateTimestr',
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
    },
  ],
}
